module.exports = app => {
    const mongoose = app.mongoose;
    const Schema = mongoose.Schema;
    const PowerSchema = new Schema({
        name: { // 权限名
            type: String,
            required: true
        },
        value: { // 权限值
            type: String,
            required: true
        },
        method: { // 添加协议的访问方法
            type: String,
            required: true
        },
        router: { // 添加协议的路由
            type: String,
            required: true
        }
    }, { timestamps: { createdAt: 'createDate', updatedAt: 'updateDate' } });
    return mongoose.model('Power', PowerSchema);
};